text stringlengths 13 1.77M | id stringlengths 22 127 | metadata dict | __index_level_0__ int64 0 28 |
|---|---|---|---|
# Run prompt flow in Azure AI
:::{admonition} Experimental feature
This is an experimental feature, and may change at any time. Learn [more](../../../how-to-guides/faq.md#stable-vs-experimental).
:::
Assuming you have learned how to create and run a flow following [Quick start](../../../how-to-guides/quick-start.md).... | promptflow/docs/cloud/azureai/quick-start/index.md/0 | {
"file_path": "promptflow/docs/cloud/azureai/quick-start/index.md",
"repo_id": "promptflow",
"token_count": 2042
} | 0 |
# Deploy a flow using Kubernetes
:::{admonition} Experimental feature
This is an experimental feature, and may change at any time. Learn [more](../faq.md#stable-vs-experimental).
:::
There are four steps to deploy a flow using Kubernetes:
1. Build the flow as docker format.
2. Build the docker image.
3. Create Kuberne... | promptflow/docs/how-to-guides/deploy-a-flow/deploy-using-kubernetes.md/0 | {
"file_path": "promptflow/docs/how-to-guides/deploy-a-flow/deploy-using-kubernetes.md",
"repo_id": "promptflow",
"token_count": 2398
} | 1 |
# Using File Path as Tool Input
Users sometimes need to reference local files within a tool to implement specific logic. To simplify this, we've introduced the `FilePath` input type. This input type enables users to either select an existing file or create a new one, then pass it to a tool, allowing the tool to access... | promptflow/docs/how-to-guides/develop-a-tool/use-file-path-as-tool-input.md/0 | {
"file_path": "promptflow/docs/how-to-guides/develop-a-tool/use-file-path-as-tool-input.md",
"repo_id": "promptflow",
"token_count": 1804
} | 2 |
# Alternative LLMs
This section provides tutorials on incorporating alternative large language models into prompt flow.
```{toctree}
:maxdepth: 1
:hidden:
``` | promptflow/docs/integrations/llms/index.md/0 | {
"file_path": "promptflow/docs/integrations/llms/index.md",
"repo_id": "promptflow",
"token_count": 43
} | 3 |
# Python
## Introduction
Users are empowered by the Python Tool to offer customized code snippets as self-contained executable nodes in PromptFlow.
Users can effortlessly create Python tools, edit code, and verify results with ease.
## Inputs
| Name | Type | Description |... | promptflow/docs/reference/tools-reference/python-tool.md/0 | {
"file_path": "promptflow/docs/reference/tools-reference/python-tool.md",
"repo_id": "promptflow",
"token_count": 1821
} | 4 |
from enum import Enum
from typing import Union
from openai import AzureOpenAI as AzureOpenAIClient, OpenAI as OpenAIClient
from promptflow.tools.common import handle_openai_error, normalize_connection_config
from promptflow.tools.exception import InvalidConnectionType
# Avoid circular dependencies: Use import 'from p... | promptflow/src/promptflow-tools/promptflow/tools/embedding.py/0 | {
"file_path": "promptflow/src/promptflow-tools/promptflow/tools/embedding.py",
"repo_id": "promptflow",
"token_count": 684
} | 5 |
import os
import re
from io import open
from typing import Any, List, Match, cast
from setuptools import find_namespace_packages, setup
PACKAGE_NAME = "promptflow-tools"
PACKAGE_FOLDER_PATH = "promptflow"
def parse_requirements(file_name: str) -> List[str]:
with open(file_name) as f:
return [
... | promptflow/src/promptflow-tools/setup.py/0 | {
"file_path": "promptflow/src/promptflow-tools/setup.py",
"repo_id": "promptflow",
"token_count": 947
} | 6 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import argparse
import json
from promptflow._cli._params import (
add_param_all_results,
add_param_archived_only,
add_param_inc... | promptflow/src/promptflow/promptflow/_cli/_pf/_experiment.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_cli/_pf/_experiment.py",
"repo_id": "promptflow",
"token_count": 2454
} | 7 |
The directory structure in the package tool is as follows:
```python
{{ package_name }}
│ setup.py # This file contains metadata about your project like the name, version.
│
│ MANIFEST.in # This file is used to determine which files to include in the distribution of the project.
│
└───{{ ... | promptflow/src/promptflow/promptflow/_cli/data/package_tool/README.md.jinja2/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_cli/data/package_tool/README.md.jinja2",
"repo_id": "promptflow",
"token_count": 311
} | 8 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import asyncio
import functools
import inspect
import logging
import threading
import time
import uuid
from contextvars import ContextVar
f... | promptflow/src/promptflow/promptflow/_core/flow_execution_context.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_core/flow_execution_context.py",
"repo_id": "promptflow",
"token_count": 4636
} | 9 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import os
from enum import Enum
from pathlib import Path
LOGGER_NAME = "promptflow"
PROMPT_FLOW_HOME_DIR_ENV_VAR = "PF_HOME_DIRECTORY"
PRO... | promptflow/src/promptflow/promptflow/_sdk/_constants.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_constants.py",
"repo_id": "promptflow",
"token_count": 5765
} | 10 |
# Prompt Flow Service
This document will describe the usage of pfs(prompt flow service) CLI.
### Start prompt flow service (optional)
If you don't install pfs as a service, you need to start pfs manually.
pfs CLI provides **start** command to start service. You can also use this command to specify the service port.
`... | promptflow/src/promptflow/promptflow/_sdk/_service/README.md/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_service/README.md",
"repo_id": "promptflow",
"token_count": 387
} | 11 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import getpass
import socket
import time
from dataclasses import InitVar, dataclass, field
from datetime import datetime
from functools impo... | promptflow/src/promptflow/promptflow/_sdk/_service/utils/utils.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_service/utils/utils.py",
"repo_id": "promptflow",
"token_count": 2835
} | 12 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from enum import Enum
from typing import Dict, Sequence, Set, List, Any
from promptflow._utils.exception_utils import ErrorResponse
from p... | promptflow/src/promptflow/promptflow/_sdk/_serving/monitor/metrics.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_serving/monitor/metrics.py",
"repo_id": "promptflow",
"token_count": 6653
} | 13 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from promptflow._version import VERSION
USER_AGENT = "{}/{}".format("promptflow-sdk", VERSION)
| promptflow/src/promptflow/promptflow/_sdk/_user_agent.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_user_agent.py",
"repo_id": "promptflow",
"token_count": 57
} | 14 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from os import PathLike
from typing import Union
# TODO(2528165): remove this file when we deprecate Flow.run_bulk
class BaseInputs(obje... | promptflow/src/promptflow/promptflow/_sdk/entities/_run_inputs.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/entities/_run_inputs.py",
"repo_id": "promptflow",
"token_count": 771
} | 15 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import json
import os
from datetime import datetime
from enum import Enum
from traceback import TracebackException, format_tb
from types im... | promptflow/src/promptflow/promptflow/_utils/exception_utils.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_utils/exception_utils.py",
"repo_id": "promptflow",
"token_count": 5411
} | 16 |
from io import StringIO
from os import PathLike
from typing import IO, AnyStr, Dict, Optional, Union
from ruamel.yaml import YAML, YAMLError
from promptflow._constants import DEFAULT_ENCODING
from promptflow._utils._errors import YamlParseError
def load_yaml(source: Optional[Union[AnyStr, PathLike, IO]]) -> Dict:
... | promptflow/src/promptflow/promptflow/_utils/yaml_utils.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_utils/yaml_utils.py",
"repo_id": "promptflow",
"token_count": 1625
} | 17 |
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.2, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | promptflow/src/promptflow/promptflow/azure/_restclient/flow/_configuration.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_restclient/flow/_configuration.py",
"repo_id": "promptflow",
"token_count": 812
} | 18 |
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.2, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_sessions_operations.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_sessions_operations.py",
"repo_id": "promptflow",
"token_count": 10750
} | 19 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
# pylint: disable=protected-access
import os
import uuid
from datetime import datetime, timedelta
from pathlib import Path
from typing imp... | promptflow/src/promptflow/promptflow/azure/operations/_artifact_utilities.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/operations/_artifact_utilities.py",
"repo_id": "promptflow",
"token_count": 6848
} | 20 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from dataclasses import dataclass
from datetime import datetime
from itertools import chain
from typing import Any, List, Mapping
from pro... | promptflow/src/promptflow/promptflow/batch/_result.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/batch/_result.py",
"repo_id": "promptflow",
"token_count": 3273
} | 21 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import asyncio
import contextvars
import inspect
import os
import signal
import threading
import time
import traceback
from asyncio import ... | promptflow/src/promptflow/promptflow/executor/_async_nodes_scheduler.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/executor/_async_nodes_scheduler.py",
"repo_id": "promptflow",
"token_count": 6253
} | 22 |
[tool.black]
line-length = 120
[tool.pytest.ini_options]
markers = [
"sdk_test",
"cli_test",
"unittest",
"e2etest",
"flaky",
"endpointtest",
"mt_endpointtest",
]
[tool.coverage.run]
omit = [
# omit anything in a _restclient directory anywhere
"*/_restclient/*",
]
| promptflow/src/promptflow/pyproject.toml/0 | {
"file_path": "promptflow/src/promptflow/pyproject.toml",
"repo_id": "promptflow",
"token_count": 139
} | 23 |
{
"version": "0.2",
"language": "en",
"languageId": "python",
"dictionaries": [
"powershell",
"python",
"go",
"css",
"html",
"bash",
"npm",
"softwareTerms",
"en_us",
"en-gb"
],
"ignorePaths": [
"**/*.js",
"**/*.pyc",
"**/*.log",
"**/*.jsonl",
"**/*... | promptflow/.cspell.json/0 | {
"file_path": "promptflow/.cspell.json",
"repo_id": "promptflow",
"token_count": 1604
} | 0 |
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.8 BLOCK -->
## Security
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), ... | promptflow/SECURITY.md/0 | {
"file_path": "promptflow/SECURITY.md",
"repo_id": "promptflow",
"token_count": 674
} | 1 |
# Adding a Tool Icon
A tool icon serves as a graphical representation of your tool in the user interface (UI). Follow this guidance to add a custom tool icon when developing your own tool package.
Adding a custom tool icon is optional. If you do not provide one, the system uses a default icon.
## Prerequisites
- Ple... | promptflow/docs/how-to-guides/develop-a-tool/add-a-tool-icon.md/0 | {
"file_path": "promptflow/docs/how-to-guides/develop-a-tool/add-a-tool-icon.md",
"repo_id": "promptflow",
"token_count": 4044
} | 2 |
# Process image in flow
PromptFlow defines a contract to represent image data.
## Data class
`promptflow.contracts.multimedia.Image`
Image class is a subclass of `bytes`, thus you can access the binary data by directly using the object. It has an extra attribute `source_url` to store the origin url of the image, which... | promptflow/docs/how-to-guides/process-image-in-flow.md/0 | {
"file_path": "promptflow/docs/how-to-guides/process-image-in-flow.md",
"repo_id": "promptflow",
"token_count": 1332
} | 3 |
# Azure OpenAI GPT-4 Turbo with Vision
## Introduction
Azure OpenAI GPT-4 Turbo with Vision tool enables you to leverage your AzureOpenAI GPT-4 Turbo with Vision model deployment to analyze images and provide textual responses to questions about them.
## Prerequisites
- Create AzureOpenAI resources
Create Azure... | promptflow/docs/reference/tools-reference/aoai-gpt4-turbo-vision.md/0 | {
"file_path": "promptflow/docs/reference/tools-reference/aoai-gpt4-turbo-vision.md",
"repo_id": "promptflow",
"token_count": 1178
} | 4 |
# Development Guide
## Prerequisites
```bash
pip install -r requirements.txt
pip install pytest pytest-mock
```
## Run tests
- Create connection config file by `cp connections.json.example connections.json`.
- Fill in fields manually in `connections.json`.
- `cd tests` and run `pytest -s -v` to run all tests.
## R... | promptflow/src/promptflow-tools/README.dev.md/0 | {
"file_path": "promptflow/src/promptflow-tools/README.dev.md",
"repo_id": "promptflow",
"token_count": 991
} | 5 |
promptflow.tools.aoai_gpt4v.AzureOpenAI.chat:
name: Azure OpenAI GPT-4 Turbo with Vision
description: Use Azure OpenAI GPT-4 Turbo with Vision to leverage AOAI vision ability.
type: custom_llm
module: promptflow.tools.aoai_gpt4v
class_name: AzureOpenAI
function: chat
tool_state: preview
icon:
light:... | promptflow/src/promptflow-tools/promptflow/tools/yamls/aoai_gpt4v.yaml/0 | {
"file_path": "promptflow/src/promptflow-tools/promptflow/tools/yamls/aoai_gpt4v.yaml",
"repo_id": "promptflow",
"token_count": 1172
} | 6 |
#!/usr/bin/env python
import sys
import os
if os.environ.get('PF_INSTALLER') is None:
os.environ['PF_INSTALLER'] = 'PIP'
os.execl(sys.executable, sys.executable, '-m', 'promptflow._cli._pf.entry', *sys.argv[1:])
| promptflow/src/promptflow/pf/0 | {
"file_path": "promptflow/src/promptflow/pf",
"repo_id": "promptflow",
"token_count": 97
} | 7 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
| promptflow/src/promptflow/promptflow/_cli/_pf_azure/__init__.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_cli/_pf_azure/__init__.py",
"repo_id": "promptflow",
"token_count": 54
} | 8 |
.env
__pycache__/
.promptflow/*
!.promptflow/flow.tools.json
.runs/
| promptflow/src/promptflow/promptflow/_cli/data/entry_flow/gitignore/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_cli/data/entry_flow/gitignore",
"repo_id": "promptflow",
"token_count": 30
} | 9 |
{# Please replace the template with your own prompt. #}
Write a simple {{text}} program that displays the greeting message.
| promptflow/src/promptflow/promptflow/_cli/data/standard_flow/hello.jinja2/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_cli/data/standard_flow/hello.jinja2",
"repo_id": "promptflow",
"token_count": 28
} | 10 |
import threading
from abc import ABC, abstractmethod
from promptflow.exceptions import UserErrorException
# to access azure ai services, we need to get the token with this audience
COGNITIVE_AUDIENCE = "https://cognitiveservices.azure.com/"
class TokenProviderABC(ABC):
def __init__(self) -> None:
super(... | promptflow/src/promptflow/promptflow/_core/token_provider.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_core/token_provider.py",
"repo_id": "promptflow",
"token_count": 629
} | 11 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from sqlalchemy import INTEGER, TEXT, Column
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm import declarative_base
from pro... | promptflow/src/promptflow/promptflow/_sdk/_orm/orchestrator.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_orm/orchestrator.py",
"repo_id": "promptflow",
"token_count": 807
} | 12 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import json
import typing
from dataclasses import asdict, dataclass
from flask import Response, render_template
from promptflow._constant... | promptflow/src/promptflow/promptflow/_sdk/_service/apis/ui.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_service/apis/ui.py",
"repo_id": "promptflow",
"token_count": 1399
} | 13 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import json
import os
import re
from typing import Any
from promptflow._sdk._serving._errors import InvalidConnectionData, MissingConnecti... | promptflow/src/promptflow/promptflow/_sdk/_serving/extension/azureml_extension.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_serving/extension/azureml_extension.py",
"repo_id": "promptflow",
"token_count": 4406
} | 14 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import argparse
import copy
import json
import os
import platform
import signal
import subprocess
import sys
import tempfile
import uuid
fro... | promptflow/src/promptflow/promptflow/_sdk/_submitter/experiment_orchestrator.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_submitter/experiment_orchestrator.py",
"repo_id": "promptflow",
"token_count": 21786
} | 15 |
Exported Dockerfile & its dependencies are located in the same folder. The structure is as below:
- flow: the folder contains all the flow files
- ...
- connections: the folder contains yaml files to create all related connections
- ...
- runit: the folder contains all the runit scripts
- ...
- Dockerfile: the do... | promptflow/src/promptflow/promptflow/_sdk/data/docker/README.md/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/data/docker/README.md",
"repo_id": "promptflow",
"token_count": 206
} | 16 |
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Tool",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"$ref": "#/definitions/ToolType"
},
"inputs": {
"type": "object",
"additionalProperties": {
"$ref": "#/definition... | promptflow/src/promptflow/promptflow/_sdk/data/tool.schema.json/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/data/tool.schema.json",
"repo_id": "promptflow",
"token_count": 4791
} | 17 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from pathlib import Path
from typing import List, Optional, Union
from promptflow._sdk._constants import MAX_LIST_CLI_RESULTS, ExperimentSt... | promptflow/src/promptflow/promptflow/_sdk/operations/_experiment_operations.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/operations/_experiment_operations.py",
"repo_id": "promptflow",
"token_count": 2536
} | 18 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import json
import os
import typing
import uuid
from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.http.trace_exporter ... | promptflow/src/promptflow/promptflow/_trace/_start_trace.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_trace/_start_trace.py",
"repo_id": "promptflow",
"token_count": 2488
} | 19 |
import base64
import os
import re
import uuid
from functools import partial
from pathlib import Path
from typing import Any, Callable, Dict
from urllib.parse import urlparse
import requests
from promptflow._utils._errors import InvalidImageInput, LoadMultimediaDataError
from promptflow.contracts.flow import FlowInput... | promptflow/src/promptflow/promptflow/_utils/multimedia_utils.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_utils/multimedia_utils.py",
"repo_id": "promptflow",
"token_count": 4305
} | 20 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from dataclasses import asdict, dataclass
from promptflow.azure._restclient.flow.models import ConnectionConfigSpec as RestConnectionConfi... | promptflow/src/promptflow/promptflow/azure/_entities/_workspace_connection_spec.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_entities/_workspace_connection_spec.py",
"repo_id": "promptflow",
"token_count": 771
} | 21 |
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.2, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_bulk_runs_operations.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_bulk_runs_operations.py",
"repo_id": "promptflow",
"token_count": 8658
} | 22 |
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.2, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/__init__.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/__init__.py",
"repo_id": "promptflow",
"token_count": 346
} | 23 |
{
"openapi": "3.0.1",
"info": {
"title": "Azure Machine Learning Designer Service Client",
"version": "1.0.0"
},
"paths": {
"/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/submit": {
"p... | promptflow/src/promptflow/promptflow/azure/_restclient/swagger.json/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_restclient/swagger.json",
"repo_id": "promptflow",
"token_count": 491948
} | 24 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
# flake8: noqa
from ._base_executor_proxy import AbstractExecutorProxy, APIBasedExecutorProxy
from ._batch_engine import BatchEngine
from .... | promptflow/src/promptflow/promptflow/batch/__init__.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/batch/__init__.py",
"repo_id": "promptflow",
"token_count": 170
} | 25 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from enum import Enum
class RunMode(str, Enum):
"""An enumeration of possible run modes."""
Test = "Test"
SingleNode = "Sing... | promptflow/src/promptflow/promptflow/contracts/run_mode.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/contracts/run_mode.py",
"repo_id": "promptflow",
"token_count": 374
} | 26 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from dataclasses import dataclass
from typing import Any, Dict, Mapping
from promptflow.contracts.run_info import FlowRunInfo, RunInfo
@... | promptflow/src/promptflow/promptflow/executor/_result.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/executor/_result.py",
"repo_id": "promptflow",
"token_count": 669
} | 27 |
{
"name": "Promptflow-Python39",
// "context" is the path that the Codespaces docker build command should be run from, relative to devcontainer.json
"context": ".",
"dockerFile": "Dockerfile",
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell... | promptflow/.devcontainer/devcontainer.json/0 | {
"file_path": "promptflow/.devcontainer/devcontainer.json",
"repo_id": "promptflow",
"token_count": 230
} | 0 |
# Consume connections from Azure AI
For a smooth development flow that transitions from cloud (Azure AI) to local environments, you can directly utilize the connection already established on the cloud by setting the connection provider to "Azure AI connections".
You can set the connection provider using the following... | promptflow/docs/cloud/azureai/consume-connections-from-azure-ai.md/0 | {
"file_path": "promptflow/docs/cloud/azureai/consume-connections-from-azure-ai.md",
"repo_id": "promptflow",
"token_count": 1002
} | 1 |
# Promptflow Reference Documentation Guide
## Overview
This guide describes how to author Python docstrings for promptflow public interfaces. See our doc site at [Promptflow API reference documentation](https://microsoft.github.io/promptflow/reference/python-library-reference/promptflow.html).
## Principles
- **Cov... | promptflow/docs/dev/documentation_guidelines.md/0 | {
"file_path": "promptflow/docs/dev/documentation_guidelines.md",
"repo_id": "promptflow",
"token_count": 2474
} | 2 |
# Creating Cascading Tool Inputs
Cascading input settings are useful when the value of one input field determines which subsequent inputs are shown. This makes the input process more streamlined, user-friendly, and error-free. This guide will walk through how to create cascading inputs for your tools.
## Prerequisite... | promptflow/docs/how-to-guides/develop-a-tool/create-cascading-tool-inputs.md/0 | {
"file_path": "promptflow/docs/how-to-guides/develop-a-tool/create-cascading-tool-inputs.md",
"repo_id": "promptflow",
"token_count": 1955
} | 3 |
# Use column mapping
In this document, we will introduce how to map inputs with column mapping when running a flow.
## Column mapping introduction
Column mapping is a mapping from flow input name to specified values.
If specified, the flow will be executed with provided value for specified inputs.
The following type... | promptflow/docs/how-to-guides/run-and-evaluate-a-flow/use-column-mapping.md/0 | {
"file_path": "promptflow/docs/how-to-guides/run-and-evaluate-a-flow/use-column-mapping.md",
"repo_id": "promptflow",
"token_count": 697
} | 4 |
# Faiss Index Lookup
Faiss Index Lookup is a tool tailored for querying within a user-provided Faiss-based vector store. In combination with our Large Language Model (LLM) tool, it empowers users to extract contextually relevant information from a domain knowledge base.
## Requirements
- For AzureML users, the tool i... | promptflow/docs/reference/tools-reference/faiss_index_lookup_tool.md/0 | {
"file_path": "promptflow/docs/reference/tools-reference/faiss_index_lookup_tool.md",
"repo_id": "promptflow",
"token_count": 1307
} | 5 |
from .aoai import AzureOpenAI # noqa: F401
from .openai import OpenAI # noqa: F401
from .serpapi import SerpAPI # noqa: F401
| promptflow/src/promptflow-tools/promptflow/tools/__init__.py/0 | {
"file_path": "promptflow/src/promptflow-tools/promptflow/tools/__init__.py",
"repo_id": "promptflow",
"token_count": 48
} | 6 |
promptflow.tools.open_model_llm.OpenModelLLM.call:
name: Open Model LLM
description: Use an open model from the Azure Model catalog, deployed to an AzureML Online Endpoint for LLM Chat or Completion API calls.
icon: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ... | promptflow/src/promptflow-tools/promptflow/tools/yamls/open_model_llm.yaml/0 | {
"file_path": "promptflow/src/promptflow-tools/promptflow/tools/yamls/open_model_llm.yaml",
"repo_id": "promptflow",
"token_count": 1312
} | 7 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import argparse
import functools
import json
from typing import Dict, List, Optional
from promptflow._cli._params import (
add_param_a... | promptflow/src/promptflow/promptflow/_cli/_pf_azure/_run.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_cli/_pf_azure/_run.py",
"repo_id": "promptflow",
"token_count": 7636
} | 8 |
{
"package": {},
"code": {
"line_process.py": {
"type": "python",
"inputs": {
"groundtruth": {
"type": [
"string"
]
},
"prediction": {
"type": [
"string"
]
}
},
"function": "line_process"
... | promptflow/src/promptflow/promptflow/_cli/data/evaluation_flow/.promptflow/flow.tools.json/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_cli/data/evaluation_flow/.promptflow/flow.tools.json",
"repo_id": "promptflow",
"token_count": 328
} | 9 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
CONNECTION_NAME_PROPERTY = "__connection_name"
CONNECTION_SECRET_KEYS = "__secret_keys"
PROMPTFLOW_CONNECTIONS = "PROMPTFLOW_CONNECTIONS"
P... | promptflow/src/promptflow/promptflow/_constants.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_constants.py",
"repo_id": "promptflow",
"token_count": 1231
} | 10 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import importlib
import importlib.util
import inspect
import logging
import traceback
import types
from functools import partial
from pathl... | promptflow/src/promptflow/promptflow/_core/tools_manager.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_core/tools_manager.py",
"repo_id": "promptflow",
"token_count": 9491
} | 11 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import datetime
import os
from contextlib import contextmanager
from pathlib import Path
from typing import List, Union
from filelock impo... | promptflow/src/promptflow/promptflow/_sdk/_orm/session.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_orm/session.py",
"repo_id": "promptflow",
"token_count": 4506
} | 12 |
packageName: Promptflow.Core.PfsClient
packageVersion: 0.0.1
targetFramework: netstandard2.0
optionalProjectFile: false
| promptflow/src/promptflow/promptflow/_sdk/_service/generator_configs/csharp.yaml/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_service/generator_configs/csharp.yaml",
"repo_id": "promptflow",
"token_count": 37
} | 13 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from pathlib import Path
from typing import Callable, Union
from promptflow import PFClient
from promptflow._constants import LINE_NUMBER_... | promptflow/src/promptflow/promptflow/_sdk/_serving/flow_invoker.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_serving/flow_invoker.py",
"repo_id": "promptflow",
"token_count": 3999
} | 14 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
# this file is a middle layer between the local SDK and executor, it'll have some similar logic with cloud PFS.
import contextlib
import ha... | promptflow/src/promptflow/promptflow/_sdk/_submitter/utils.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_submitter/utils.py",
"repo_id": "promptflow",
"token_count": 8807
} | 15 |
#!/bin/bash
# stop services created by runsv and propagate SIGINT, SIGTERM to child jobs
sv_stop() {
echo "$(date -uIns) - Stopping all runsv services"
for s in $(ls -d /var/runit/*); do
sv stop $s
done
}
# register SIGINT, SIGTERM handler
trap sv_stop SIGINT SIGTERM
# start services in backgroun... | promptflow/src/promptflow/promptflow/_sdk/data/docker/start.sh.jinja2/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/data/docker/start.sh.jinja2",
"repo_id": "promptflow",
"token_count": 135
} | 16 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import abc
import importlib
import json
import types
from os import PathLike
from pathlib import Path
from typing import Dict, List, Union
... | promptflow/src/promptflow/promptflow/_sdk/entities/_connection.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/entities/_connection.py",
"repo_id": "promptflow",
"token_count": 16239
} | 17 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import re
from typing import List
from promptflow._sdk._constants import AZURE_WORKSPACE_REGEX_FORMAT, MAX_LIST_CLI_RESULTS
from promptflow... | promptflow/src/promptflow/promptflow/_sdk/operations/_local_azure_connection_operations.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/operations/_local_azure_connection_operations.py",
"repo_id": "promptflow",
"token_count": 2867
} | 18 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import asyncio
from concurrent.futures import ThreadPoolExecutor
def _has_running_loop() -> bool:
"""Check if the current thread has ... | promptflow/src/promptflow/promptflow/_utils/async_utils.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_utils/async_utils.py",
"repo_id": "promptflow",
"token_count": 524
} | 19 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from copy import deepcopy
from promptflow._core.generator_proxy import GeneratorProxy
def _deep_copy_and_extract_items_from_generator_pro... | promptflow/src/promptflow/promptflow/_utils/run_tracker_utils.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_utils/run_tracker_utils.py",
"repo_id": "promptflow",
"token_count": 286
} | 20 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import os
from os import PathLike
from typing import Dict, List, Optional, Union
from azure.ai.ml import MLClient
from azure.core.credentia... | promptflow/src/promptflow/promptflow/azure/_pf_client.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_pf_client.py",
"repo_id": "promptflow",
"token_count": 5612
} | 21 |
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.2, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_runs_admin_operations.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_runs_admin_operations.py",
"repo_id": "promptflow",
"token_count": 12446
} | 22 |
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.2, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_connections_operations.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_connections_operations.py",
"repo_id": "promptflow",
"token_count": 13181
} | 23 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
from .gerneral import is_arm_id
__all__ = ["is_arm_id"]
| promptflow/src/promptflow/promptflow/azure/_utils/__init__.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_utils/__init__.py",
"repo_id": "promptflow",
"token_count": 80
} | 24 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from pathlib import Path
from typing import Any, Dict, List, Mapping, Optional
from promptflow._constants import LINE_NUMBER_KEY
from prom... | promptflow/src/promptflow/promptflow/batch/_batch_inputs_processor.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/batch/_batch_inputs_processor.py",
"repo_id": "promptflow",
"token_count": 4930
} | 25 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from dataclasses import dataclass
class Secret(str):
"""This class is used to hint a parameter is a secret to load."""
def set_s... | promptflow/src/promptflow/promptflow/contracts/types.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/contracts/types.py",
"repo_id": "promptflow",
"token_count": 503
} | 26 |
from promptflow.exceptions import UserErrorException
class FlowFilePathInvalid(UserErrorException):
pass
| promptflow/src/promptflow/promptflow/executor/_service/_errors.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/executor/_service/_errors.py",
"repo_id": "promptflow",
"token_count": 28
} | 27 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from ._cache_storage import AbstractCacheStorage # noqa: F401
from ._run_storage import AbstractBatchRunStorage, AbstractRunStorage # noq... | promptflow/src/promptflow/promptflow/storage/__init__.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/storage/__init__.py",
"repo_id": "promptflow",
"token_count": 87
} | 28 |
Tools are the fundamental building blocks of a [flow](./concept-flows.md).
Each tool is an executable unit, basically a function to performs various tasks including but not limited to:
- Accessing LLMs for various purposes
- Querying databases
- Getting information from search engines
- Pre/post processing of data
# ... | promptflow/docs/concepts/concept-tools.md/0 | {
"file_path": "promptflow/docs/concepts/concept-tools.md",
"repo_id": "promptflow",
"token_count": 444
} | 0 |
# Develop a flow
We provide guides on how to develop a flow by writing a flow yaml from scratch in this section.
```{toctree}
:maxdepth: 1
:hidden:
develop-standard-flow
develop-chat-flow
develop-evaluation-flow
referencing-external-files-or-folders-in-a-flow
``` | promptflow/docs/how-to-guides/develop-a-flow/index.md/0 | {
"file_path": "promptflow/docs/how-to-guides/develop-a-flow/index.md",
"repo_id": "promptflow",
"token_count": 87
} | 1 |
# Manage connections
:::{admonition} Experimental feature
This is an experimental feature, and may change at any time. Learn [more](faq.md#stable-vs-experimental).
:::
[Connection](../../concepts/concept-connections.md) helps securely store and manage secret keys or other sensitive credentials required for interactin... | promptflow/docs/how-to-guides/manage-connections.md/0 | {
"file_path": "promptflow/docs/how-to-guides/manage-connections.md",
"repo_id": "promptflow",
"token_count": 2251
} | 2 |
from datetime import datetime
import time
import requests
import sys
import json
from azure.identity import AzureCliCredential
import logging
from azure.ai.ml import MLClient
from sseclient import SSEClient
class ColoredFormatter(logging.Formatter):
# Color code dictionary
color_codes = {
'debug': '\... | promptflow/docs/media/how-to-guides/how-to-enable-streaming-mode/scripts/chat_app.py/0 | {
"file_path": "promptflow/docs/media/how-to-guides/how-to-enable-streaming-mode/scripts/chat_app.py",
"repo_id": "promptflow",
"token_count": 3156
} | 3 |
# PLACEHOLDER | promptflow/docs/reference/python-library-reference/promptflow.md/0 | {
"file_path": "promptflow/docs/reference/python-library-reference/promptflow.md",
"repo_id": "promptflow",
"token_count": 6
} | 4 |
include promptflow/tools/yamls/*.yaml | promptflow/src/promptflow-tools/MANIFEST.in/0 | {
"file_path": "promptflow/src/promptflow-tools/MANIFEST.in",
"repo_id": "promptflow",
"token_count": 13
} | 5 |
import json
import sys
from enum import Enum
import requests
# Avoid circular dependencies: Use import 'from promptflow._internal' instead of 'from promptflow'
# since the code here is in promptflow namespace as well
from promptflow._internal import ToolProvider, tool
from promptflow.connections import SerpConnection
... | promptflow/src/promptflow-tools/promptflow/tools/serpapi.py/0 | {
"file_path": "promptflow/src/promptflow-tools/promptflow/tools/serpapi.py",
"repo_id": "promptflow",
"token_count": 2097
} | 6 |
{
"azure_open_ai_connection": {
"type": "AzureOpenAIConnection",
"value": {
"api_key": "aoai-api-key",
"api_base": "aoai-api-endpoint",
"api_type": "azure",
"api_version": "2023-07-01-preview"
},
"module": "promptflow.connections"
},
"bing_config": {
"type": "BingConnec... | promptflow/src/promptflow/dev-connections.json.example/0 | {
"file_path": "promptflow/src/promptflow/dev-connections.json.example",
"repo_id": "promptflow",
"token_count": 988
} | 7 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
# pylint: disable=wrong-import-position
import json
import time
from promptflow._cli._pf._experiment import add_experiment_parser, dispatch... | promptflow/src/promptflow/promptflow/_cli/_pf/entry.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_cli/_pf/entry.py",
"repo_id": "promptflow",
"token_count": 2510
} | 8 |
$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json
inputs:
{% for arg, typ in flow_inputs.items() %}
{{ arg }}:
type: {{ typ }}
{% endfor %}
outputs:
output:
type: string
reference: {% raw %}${{% endraw %}{{ main_node_name }}.output}
nodes:
{% for param_name, file in promp... | promptflow/src/promptflow/promptflow/_cli/data/entry_flow/flow.dag.yaml.jinja2/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_cli/data/entry_flow/flow.dag.yaml.jinja2",
"repo_id": "promptflow",
"token_count": 517
} | 9 |
{"text": "Hello World!"}
| promptflow/src/promptflow/promptflow/_cli/data/standard_flow/data.jsonl/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_cli/data/standard_flow/data.jsonl",
"repo_id": "promptflow",
"token_count": 9
} | 10 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import asyncio
import json
from contextvars import ContextVar
from datetime import datetime, timezone
from types import GeneratorType
from ... | promptflow/src/promptflow/promptflow/_core/run_tracker.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_core/run_tracker.py",
"repo_id": "promptflow",
"token_count": 8964
} | 11 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import datetime
from enum import Enum
from typing import List, Optional, Union
from sqlalchemy import TEXT, Boolean, Column, Index
from sq... | promptflow/src/promptflow/promptflow/_sdk/_orm/experiment.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_orm/experiment.py",
"repo_id": "promptflow",
"token_count": 2618
} | 12 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import typing
from dataclasses import dataclass
from flask_restx import fields
from promptflow._constants import (
SpanAttributeField... | promptflow/src/promptflow/promptflow/_sdk/_service/apis/span.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_service/apis/span.py",
"repo_id": "promptflow",
"token_count": 1480
} | 13 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import flask
from jinja2 import Template
from pathlib import Path
from flask import Blueprint, request, url_for, current_app as app
def c... | promptflow/src/promptflow/promptflow/_sdk/_serving/blueprint/static_web_blueprint.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_serving/blueprint/static_web_blueprint.py",
"repo_id": "promptflow",
"token_count": 545
} | 14 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import json
import os
import time
import base64
import zlib
from flask import jsonify, request
from promptflow._sdk._serving._errors impor... | promptflow/src/promptflow/promptflow/_sdk/_serving/utils.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_serving/utils.py",
"repo_id": "promptflow",
"token_count": 1868
} | 15 |
import json
import os
from pathlib import Path
from PIL import Image
import streamlit as st
from streamlit_quill import st_quill
from promptflow._sdk._serving.flow_invoker import FlowInvoker
from utils import dict_iter_render_message, parse_list_from_html, parse_image_content
invoker = None
{% set indent_level = 4 %... | promptflow/src/promptflow/promptflow/_sdk/data/executable/main.py.jinja2/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/data/executable/main.py.jinja2",
"repo_id": "promptflow",
"token_count": 2320
} | 16 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import os.path
from dotenv import dotenv_values
from marshmallow import RAISE, fields, post_load, pre_load
from promptflow._sdk._utils imp... | promptflow/src/promptflow/promptflow/_sdk/schemas/_run.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/schemas/_run.py",
"repo_id": "promptflow",
"token_count": 1545
} | 17 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
# This file is for open source,
# so it should not contain any dependency on azure or azureml-related packages.
import json
import loggin... | promptflow/src/promptflow/promptflow/_utils/logger_utils.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_utils/logger_utils.py",
"repo_id": "promptflow",
"token_count": 5614
} | 18 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.